package org.apache.flink.connector.httptm.factories;

import org.apache.flink.connector.httptm.RequestInfo;

import java.util.Map;

public interface RequestFactory {

    /**
     * Returns a unique identifier among same factory interfaces.
     * @return factory identifier
     */
    String factoryIdentifier();


    /**
     * 生成请求对象
     * @param path url
     * @param headers 请求头
     * @param params 请求参数
     * @param body 请求体
     * @param settings 设置
     * @return 请求对象
     * @throws Exception ignored
     */
    RequestInfo createRequestInfo(String path, Map<String, String> headers, Map<String, String> params, String body,  Map<String, Object> settings) throws Exception;
}
